<div class="shelves_wrapper">
    <div class="home_shelf_1">
        <div class="shelf_nav">
            <div class="more_docs"><a href=""><?php echo __('Explore more documents') ?> >></a></div>
            <ul>
                <li><a href=""><?php echo __('Featured') ?></a></li>
                <li class="selected"><a href=""><?php echo __('Newest') ?></a></li>
                <li><a href=""><?php echo __('A to Z') ?></a></li>
            </ul>
            <div class="clear"></div>
        </div>
        <div class="shelf_images">
            <table width="911" align="center">
                <tr>
                    <?php foreach ($items_1 as $k => $one) { ?>
                        <?php $local_path = sfConfig::get('sf_web_dir') . '/uploads/doseyeh/' . $one['cover_image'] ?>
                        <?php $original_image = public_path('/uploads/doseyeh/' . $one['cover_image']) ?>
                        <?php $public_path = get_resized_image(110, 136, $local_path) ?>
                        <td>
                            <a class="fancybox" href="<?php echo $original_image ?>"><img <?php if(0){ ?> onclick="window.location='<?php echo url_for('doseyeh/show?id='.$one['id']) ?>'" <?php } ?>title="<?php echo $one['name'] ?>" src="<?php echo $public_path ?>"/></a>
                        </td>
                    <?php } ?>
                    <?php for ($i = $k; $i < 5; $i++) { ?>
                        <td></td>
                    <?php } ?>
                    <?php ?>
                </tr>
            </table>
        </div>
    </div>
    <?php if (isset($items_2)) { ?>
        <div class="home_shelf_2">
            <div class="shelf_images_2">
                <table width="911">
                    <tr>
                        <?php foreach ($items_2 as $k => $one) { ?>
                            <?php $original_image = public_path('/uploads/doseyeh/' . $one['cover_image']) ?>
                            <?php $local_path = sfConfig::get('sf_web_dir') . '/uploads/doseyeh/' . $one['cover_image'] ?>
                            <?php $public_path = get_resized_image(110, 136, $local_path) ?>
                            <td>
                                <a class="fancybox" href="<?php echo $original_image ?>"><img <?php if(0){ ?>onclick="window.location='<?php echo url_for('doseyeh/show?id='.$one['id']) ?>'"<?php } ?> title="<?php echo $one['name'] ?>" src="<?php echo $public_path ?>"/></a>
                            </td>
                        <?php } ?>
                        <?php for ($i = $k; $i < 5; $i++) { ?>
                            <td></td>
                        <?php } ?>
                        <?php ?>
                    </tr>
                </table>
            </div>

        </div>
    <?php } ?>
    <?php if (isset($items_2) && count($items_2) > 6) { ?>
        <div class="home_shelf_2_pager">
            <ul class="pager">
                <li><a href="#"><?php echo __('First') ?></a></li>
                <li><a href="#"><?php echo __('Previous') ?></a></li>
                <li class="selected"><a href="#"><?php echo __('1') ?></a></li>
                <li><a href="#"><?php echo __('2') ?></a></li>
                <li><a href="#"><?php echo __('3') ?></a></li>
                <li><a href="#"><?php echo __('Next') ?></a></li>
                <li><a href="#"><?php echo __('Last') ?></a></li>
            </ul>
        </div>
    <?php } else { ?>
        <br/>
    <?php } ?>
</div>
<script type="text/javascript">
    $('.shelf_images img,.shelf_images_2 img').mouseover(function(){
        $(this).animate({'height':'141px'},100,'linear');
    });
    $('.shelf_images img,.shelf_images_2 img').mouseout(function(){
        $(this).animate({'height':'136px'},100,'linear');
    });
</script>